package com.xbh.Book.pojo;

/**
 * @program: JavaWebExer
 * @description: 用户属性，创建javabean对象
 * @author: 许宝华
 * @create: 2021-04-03 14:29
 */

public class User {
    /**
            ORM编程思想
                1、一个数据表对应一个java类
                2、表中的一条记录对应java类中的一个对象
                3、表中的一个字段对应java类中的一个属性
     */
    private Integer id;
    private String username;
    private String password;
    private String email;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", email='" + email + '\'' +
                '}';
    }

    public User() {
    }

    public User(Integer id,String username, String password, String email) {
        this.username = username;
        this.password = password;
        this.email = email;
    }
}
